package model

import "time"

type PermissionType string

const (
	PermissionTypeApi    PermissionType = "api"
	PermissionTypeMenu   PermissionType = "menu"
	PermissionTypeButton PermissionType = "button"
)

type SysPermission struct {
	ID        uint           `gorm:"primaryKey;column:id"`
	Type      PermissionType `gorm:"column:type"`
	Path      string         `gorm:"column:path"`
	Name      string         `gorm:"column:name"`
	Status    int8           `gorm:"column:status"`
	CreatedAt time.Time      `gorm:"column:created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at"`
}

func (SysPermission) TableName() string {
	return "sys_permissions"
}
